<?php
  MYDCONN();

  $GLOBALS['MYD']->db_query("UPDATE ccenter_invoices SET
            Status = 2,
            TYPEPay = 2,
            TimeClose = '{$sysTime}',
            PayAprove = {$_SESSION[$SESSID]}
            WHERE Ref IN (".substr($_POST['POOL'],0,strlen($_POST['POOL'])-1).")");
 echo '<script charset="utf-8" type="text/javascript">document.getInvoices.action=\'Modules/CentrodeCustos/Lib/rs_invoices.php\';
    		subform(\'getInvoices\',\'rsInvoices\');</script>';